<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>54.allSettled方法</title>
</head>
<body>
<script>
  let p1 = new Promise((resolve, reject) => {
    resolve('数据1')
  })
  let p2 = new  Promise((resolve, reject) => {
    reject('出错了')
  })

  let result = Promise.allSettled([p1,p2])
  console.log(result)
  let result2 = Promise.all([p1,p2])
  console.log(result2)

</script>
</body>
</html>